import React from 'react';
import {Button} from 'antd'
import NewsPublish from '../../../components/publish-manage/NewsPublish'
import usePublish from '../../../components/publish-manage/usePublish'
//代发布的
const Sunset = () => {
    const {dataSource, handleSunset, handleUnpublished} = usePublish(3)
    return (
        <div>
            <NewsPublish dataSource={dataSource}
             button={(id)=><div>
                 <Button type="primary" ghost onClick={()=>handleUnpublished(id)}>发布</Button>
                 &nbsp;
                 <Button danger onClick={()=>handleSunset(id)}>删除</Button>
             </div>
             
             }></NewsPublish>
        </div>
    );
};

export default Sunset;